
//返回顶部效果
var t = document.querySelector("#toTop");
window.onscroll = function () {
    console.log(document.documentElement.scrollTop > 500 || document.body.scrollTop > 500);
    if (document.documentElement.scrollTop > 500 || document.body.scrollTop > 500){
        t.style.display = "block";
    }else {
        t.style.display = "none";
    }
}

//点击返回顶部

 t.addEventListener( 'click',function () {
    //让  dcrollto 支持平滑滚动
     window.scrollTo({
         top:0,
         behavior:'smooth'
     })
})

//移入移出

var button = document.querySelector("#btnGroupDrop1");
var tw = document.querySelector(".tw");

button.addEventListener("mouseover",function () {
    tw.style.display = "block";
});
button.addEventListener("mouseleave",function () {
    tw.style.display = "none";
});
tw.addEventListener("mouseover",function () {
    tw.style.display = "block";
});
tw.addEventListener("mouseleave",function () {
    tw.style.display = "none";
});
